import request from '@/utils/request'// 查询用户列表
import { parseStrEmpty } from "@/utils/frameWork";
export function listTime(query) {
  return request({
    url: '/supervision/timeLimit/list',
    method: 'get',
    params: query
  })
}

// 查询用户详细
export function getTime(userId) {
  return request({
    url: '/supervision/timeLimit/' + parseStrEmpty(userId),
    method: 'get'
  })
}

// 新增用户
export function addTime(data) {
  return request({
    url: '/supervision/timeLimit',
    method: 'post',
    data: data
  })
}

// 修改用户
export function updateTime(data) {
  return request({
    url: '/supervision/timeLimit',
    method: 'put',
    data: data
  })
}

// 删除用户
export function delTime(userId) {
  return request({
    url: '/supervision/timeLimit/' + userId,
    method: 'delete'
  })
}
// 时限重复校验
export function timeLimitValidate(data) {
  return request({
    url: '/supervision/timeLimit/timeLimitValidate',
    method: 'post',
    data: data
  })
}